/*
 * test-CameraController.cpp
 *
 *  Created on: 2011/09/13
 *      Author: ueda
 */
#include <unittest++/UnitTest++.h>
#include "CameraController.hpp"
using namespace m3g_viewer;

TEST (CameraController_const)
{
	CameraController* cc = new CameraController ();

	float pos[3];
	float lookat[3];
	float up[3];

	cc->get_camera_pos (pos);
	CHECK_CLOSE (0, pos[0]   , 0.0001f);
	CHECK_CLOSE (0, pos[1]   , 0.0001f);
	CHECK_CLOSE (1, pos[2]   , 0.0001f);

	cc->get_camera_lookat (pos);
	CHECK_CLOSE (0, lookat[0], 0.0001f);
	CHECK_CLOSE (0, lookat[1], 0.0001f);
	CHECK_CLOSE (0, lookat[2], 0.0001f);

	cc->get_camera_up (pos);
	CHECK_CLOSE (0, up[0]    , 0.0001f);
	CHECK_CLOSE (1, up[1]    , 0.0001f);
	CHECK_CLOSE (0, up[2]    , 0.0001f);

	delete cc;
}
